home *** CD-ROM | disk | FTP | other *** search
- global gMessageBox, gInterAni, gAniPairRed, gAniPairBlue, gAniPairWon, gAniPairLost, gDelayButton, gAniPairSeq, gNextChannel
-
- on gameError text
- sprite(83).loc = point(270, 240)
- gDelayButton = -1
- gMessageBox.mb_BoxSize(point(75, 115), point(75, 115), point(95, 125), 230, 145, 230, 145)
- gMessageBox.mb_text(text)
- end
-
- on gameErrorBig text
- sprite(83).loc = point(270, 240)
- gDelayButton = -1
- gMessageBox.mb_BoxSize(point(75, 80), point(75, 80), point(95, 90), 230, 175, 230, 175)
- gMessageBox.mb_text(text)
- end
-
- on setintermission
- gInterAni = [["wave", "pop", "chase", "slide", "dance"]]
- end
-
- on intermission
- sprite(83).member = "SkipUp"
- gDelayButton = the timer + (2 * 60)
- sprite(83).loc = point(-200, 315)
- gMessageBox.mb_BoxSize(point(35, 60), point(35, 60), point(50, 125), 315, 275, 315, 275)
- end
-
- on setMainAnimations
- gAniPairRed = [[["bounce", "grumblens"], ["flip", "grumblens"], ["dance", "grumblens"], ["morefrendz", "grumblens"], ["woohoo", "grumblens"], ["haha", "grumblens"], ["bust", "grumblens"], ["lose", "grumblens"], ["flipns", "grumblens"], ["bouncens", "grumblens"], ["dancens", "grumblens"], ["flipns", "grumblens"], ["bouncens", "grumblens"], ["dancens", "grumblens"], ["flipns", "grumblens"], ["bouncens", "grumblens"], ["dancens", "grumblens"], ["flipns", "grumblens"], ["bouncens", "grumblens"], ["dancens", "grumblens"], ["flipns", "grumblens"], ["bouncens", "grumblens"], ["dancens", "grumblens"]]]
- gAniPairBlue = [[["bounce", "grumblens"], ["flip", "grumblens"], ["dance", "grumblens"], ["morefrendz", "grumblens"], ["woohoo", "grumblens"], ["haha", "grumblens"], ["bust", "grumblens"], ["move", "grumblens"], ["flipns", "grumblens"], ["bouncens", "grumblens"], ["dancens", "grumblens"], ["flipns", "grumblens"], ["bouncens", "grumblens"], ["dancens", "grumblens"], ["flipns", "grumblens"], ["bouncens", "grumblens"], ["dancens", "grumblens"], ["flipns", "grumblens"], ["bouncens", "grumblens"], ["dancens", "grumblens"], ["flipns", "grumblens"], ["bouncens", "grumblens"], ["dancens", "grumblens"]]]
- gAniPairLost = [[["ohno", "bouncens"], ["ohno", "flipns"], ["ohno", "dancens"]]]
- gAniPairWon = [[["bounce", "grumblens"], ["flip", "grumblens"], ["dance", "grumblens"], ["woohoo", "grumblens"], ["haha", "grumblens"]]]
- end
-
- on playFlashAnimationOne theFrame, num, withSound
- put theFrame
- sprite(num).goToFrame(theFrame)
- put sprite(num).frame
- sprite(num).play()
- return theFrame
- end
-
- on playFlashAnimation count, num, withSound
- put count
- frame = pickRandom(count)
- put frame
- sprite(num).goToFrame(frame)
- put sprite(num).frame
- sprite(num).play()
- return frame
- end
-
- on playFlashAnimationPair count, Num1, Num2, withSound, inSeq
- if inSeq = VOID then
- inSeq = 0
- end if
- if inSeq then
- if gAniPairSeq = VOID then
- gAniPairSeq = 1
- else
- gAniPairSeq = gAniPairSeq + 1
- if gAniPairSeq > count[1].count() then
- gAniPairSeq = 1
- end if
- end if
- frames = count[1][gAniPairSeq]
- else
- put count
- frames = pickRandom(count)
- put frames
- end if
- sprite(Num1).goToFrame(frames[1])
- put sprite(Num1).frame
- sprite(Num1).play()
- sprite(Num2).goToFrame(frames[2])
- put sprite(Num2).frame
- sprite(Num2).play()
- return frames
- end
-
- on playFlashAnimationPairWhich count, Num1, Num2, withSound, which
- put count
- frames = count[1][which]
- put frames
- sprite(Num1).goToFrame(frames[1])
- put sprite(Num1).frame
- sprite(Num1).play()
- sprite(Num2).goToFrame(frames[2])
- put sprite(Num2).frame
- sprite(Num2).play()
- end
-
- on pickRandom theList
- if theList.count = 1 then
- pvInitRandomList(theList)
- end if
- theCounts = theList[2]
- numItems = theCounts.count
- r = random(numItems)
- r2 = r
- best = 1000000
- repeat with i = 1 to numItems
- if (theList[3] <> r2) and (theCounts[r2] < best) then
- best = theCounts[r2]
- r = r2
- end if
- r2 = (r2 mod numItems) + 1
- end repeat
- theCounts[r] = theCounts[r] + 1
- theList[3] = r
- return theList[1][r]
- end
-
- on pvInitRandomList theList
- n = theList[1].count
- temp = []
- repeat with i = 1 to n
- append(temp, 0)
- end repeat
- append(theList, temp)
- append(theList, -1)
- end
-
- on playSoundFreeChannel theSound
- if gNextChannel = VOID then
- gNextChannel = 3
- else
- gNextChannel = gNextChannel + 1
- if gNextChannel > 7 then
- gNextChannel = 3
- end if
- end if
- puppetSound(gNextChannel, theSound)
- end
-